function Sprite() {}
Sprite.prototype = new Entity;


Sprite.prototype.image;
Sprite.prototype.context;

Sprite.prototype.posX;
Sprite.prototype.posY;

Sprite.prototype.currentPosX;
Sprite.prototype.currentPosY;

Sprite.prototype.offsetFactorX;
Sprite.prototype.offsetFactorY;


Sprite.prototype.init = function()
{
  this.offsetFactorX = 1;
  this.offsetFactorY = 1;
  
  this.posX = 0;
  this.posY = 0;

  this.currentPosX = this.posX;
  this.currentPosY = this.posY;
}


Sprite.prototype.loadImage = function(path)
{
  this.image = new Image();
  this.image.src = path;
}


Sprite.prototype.update = function()
{
  this.currentPosX = this.posX;// + (RTE.GameManager.PlayerCamera.offsetX * this.offsetFactorX);
  this.currentPosY = this.posY;// + (RTE.GameManager.PlayerCamera.offsetY * this.offsetFactorY);

  RTE.RenderManager.RenderText.text = this.currentPosX + " " + this.currentPosY
}


Sprite.prototype.render = function(currentPosX, currentPosY)
{
  if (currentPosX != undefined || currentPosY != undefined) {
    this.currentPosX = currentPosX;
    this.currentPosY = currentPosY;
  }
  this.context.drawImage(this.image, this.currentPosX, this.currentPosY);
}

